import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;


public class StringWriter {
	
	/*
	 * Function for writing String str into
	 * an output file specified by given path
	 */
	public void writeString(String str,String output)
	{
		File file=new File(output);
		try 
		{
			//System.out.println("###########:    "+str);
			FileWriter fileWriter = new FileWriter(file,true);
			BufferedWriter bufferedWriter=new BufferedWriter(fileWriter);
			bufferedWriter.write(str);
			bufferedWriter.close();
			fileWriter.close();
		} 
		catch (IOException e) 
		{	
			e.printStackTrace();
		}


	}
}
